package system

type Meta struct {
	Title string `json:"title" form:"title" `
	Icon  string `json:"icon" form:"icon" `
	Roles []uint `json:"roles" form:"roles" `
}

// 用户动态路由返回
type UserMenuResponse struct {
	Path       string             `json:"path" form:"path" `
	Component  string             `json:"component" form:"component" `
	Redirect   bool			  	  `json:"redirect" form:"redirect" `
	AlwaysShow bool               `json:"alwaysShow" form:"alwaysShow" `
	Name       string             `json:"name" form:"name" `
	Meta       Meta               `json:"meta"`
	Children   []UserMenuResponse `json:"children,omitempty"`
}

type MenuListResponse struct {
	Id         uint               `json:"id" form:"id" `
	ParentId   uint				  `json:"parent_id" form:"parent_id" `
	Path       string             `json:"path" form:"path" `
	Icon       string             `json:"icon" form:"icon" `
	Title      string             `json:"title" form:"title" `
	Component  string             `json:"component" form:"component" `
	AlwaysShow bool               `json:"alwaysShow" form:"alwaysShow" `
	MenuType   uint               `json:"menuType" form:"menuType" `
	Name       string             `json:"name" form:"name" `
	Status     uint               `json:"status" form:"status" `
	Children   []MenuListResponse `json:"children,omitempty"`
}

type MenuInfoResponse struct {
	Id         uint   `json:"id" form:"id" `
	ParentId   uint   `json:"parent_id" form:"parent_id" `
	Path       string `json:"path" form:"path" `
	Icon       string `json:"icon" form:"icon" `
	Title      string `json:"title" form:"title" `
	Component  string `json:"component" form:"component" `
	AlwaysShow uint   `json:"always_show" form:"always_show" `
	Name       string `json:"name" form:"name" `
	Status     uint   `json:"status" form:"status" `
	Sort       int    `json:"sort" form:"sort" `
	MenuType   uint   `json:"menu_type" form:"menu_type" `
	Apis       []uint `json:"apis" form:"apis" `
}

type Apis struct {
	ApiId    uint `json:"api_id" form:"api_id" `
}
